<template>
	<view>
		<view class="head">
			<view class="head_left" @tap="back()">
				<image src="../../../static/wode/return.png" mode=""></image>
				<text>境友</text>
			</view>
			<view class="head_mid">
				互动
			</view>
			<view class="head_right">

			</view>
		</view>
		<view class="select_type">
			<view class="type_item" v-for="(item,index) in typeList" :key="index" :class="{active:typeIndex==index}" @click="selseType(index)"
			 v-text="item">
				<view v-if="typeIndex==index" class="smallBox"></view>
			</view>
		</view>
		<view class="body">
			<view class="body_item">
				<view class="image_box">
					<image class="headImg" src="../../../static/avatar.jpg" mode=""></image>
					<image class="country" src="../../../static/meiguo.png" mode=""></image>
					<view class="time">
						下午2:30
					</view>
				</view>
				<view class="body_item_mid">
					<view class="name_box">
						<text class="nickname">I am an Americon.</text>
						<image class="sex" src="../../../static/jingyou/lady.png" mode=""></image>
						<text class="renzheng">实名认证</text>
						<text class="renzheng2">留学生</text>
					</view>
					<text class="qianming">签名:hi,do you want to see the life of our Americans.</text>
					<view class="details">
						<text>故乡:美国</text>
						<text>同学</text>
						<text>328km</text>
					</view>
				</view>
				<view class="body_item_right">
					<view class="last_time">30分钟前</view>
					<image class="talkTo" src="../../../static/jingyou/liaoliao.png" mode=""></image>
				</view>
			</view>


		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				typeList: ['我喜欢','喜欢我','我看过', '看过我'],
				typeIndex: 0,
			};
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
			selseType(index) {
				this.typeIndex = index
			},
		},
	}
</script>

<style scoped>
	.head {
		width: 100%;
		display: flex;
		justify-content: space-between;
		height: 128upx;
		background: #ffffff;
		padding: 0 24upx;
		z-index: 200;
	}

	.head image {
		width: 20upx;
		height: 36upx;
		margin-right: 9upx;
	}

	.head_left {
		height: 82upx;
		width: 106upx;
		display: flex;
		align-items: center;
		line-height: 82upx;
		color: #666666;
		font-size: 32upx;

	}

	.head_right {
		width: 106upx;
	}

	.select_type {
		height: 88upx;
		background: #ffffff;
		border-top: 1upx solid #E6E6E6;
		display: flex;
		justify-content: space-between;
		padding: 0 40upx;
	}


	.smallBox {
		width: 32upx;
		height: 6upx;
		background: #46CECF;
		border-radius: 3upx;
		position: relative;
		bottom: -4upx;
	}

	.type_item {
		color: #999999;
		padding-top: 28upx;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.active {
		color: #46CECF;

	}

	.body_item {
		padding: 24upx 24upx;
		background: #FFFFFF;
		display: flex;
		border-bottom: 1upx solid #E6E6E6;
		margin-top: 20upx;
	}

	.image_box {
		position: relative;

	}

	.headImg {
		height: 125upx;
		width: 125upx;
		border-radius: 50%;
		overflow: hidden;
	}

	.country {
		width: 36upx;
		height: 36upx;
		position: absolute;
		left: -4upx;
		bottom: 8upx;
		z-index: 20;
	}

	.body_item_mid {
		display: flex;
		flex-direction: column;
		padding-left: 30upx;
	}

	.nickname {
		color: #333333;
		font-size: 32upx;
		max-width: 208upx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.body_item_right {
		position: relative;
	}

	.time {
		width: 84upx;
		height: 24upx;
		background: #999999;
		opacity: 0.8;
		color: #FFFFFF;
		border-radius: 24upx;
		font-size: 14upx;
		padding-left: 20upx;
		line-height: 24upx;
		z-index: 10;
		position: absolute;
		bottom: 10upx;
		left: 10upx;
	}

	.sex {
		width: 26upx;
		height: 26upx;
	}

	.talkTo {
		width: 55upx;
		height: 55upx;
		padding-left: 76upx;
	}
	.name_box{
		display: flex;
		align-items: center;
	}
	.renzheng{
		max-width: 80upx;
		font-size: 18upx;
		border: 1upx solid #33cbcc;
		float: left;
		border-radius: 5upx;
		box-sizing: border-box;
		text-align: center;
		line-height: 25upx;
		height: 25upx;
		font-size: 16upx;
		color: #33cbcc;
		padding: 0 5upx;
		margin-left: 10upx;
	}
	.renzheng2{
		width: 60upx;
		font-size: 18upx;
		border: 1upx solid #8E8F9F;
		float: left;
		border-radius: 5upx;
		box-sizing: border-box;
		text-align: center;
		line-height: 25upx;
		height: 25upx;
		font-size: 16upx;
		color: #8E8F9F;
		padding: 0 5upx;
		margin-left: 10upx;
	}
	.qianming{
		color: #999999;
		font-size: 26upx;
		max-width: 420upx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		margin-top: 6upx;

	}
	.details{
		color: #999999;
		font-size: 26upx;
		display: flex;
		width: 400upx;
		justify-content: space-between;
		margin-top: 8upx;
	}
	.last_time{
		color: #999999;
		font-size: 26upx;
		padding-left: 20upx;
		margin-bottom: 30upx;
	}
	
</style>
